package com;


import com.dto.UserDto;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

/**
 * @author :Administrator
 * @description: TODO edit class Description
 * @create date: 2021/12/9 13:27
 */
public class MapTest {
    public static void main(String[] args) {
        methodName2();
    }

    public static void methodName1(){
        // 拼接数据
        Map<String, UserDto> webSocketMap = new ConcurrentHashMap<>();
        webSocketMap.put("aa",UserDto.builder().name("aa").build());
        webSocketMap.put("bb",UserDto.builder().name("bb").build());
        webSocketMap.put("cc",UserDto.builder().name("cc").build());
        String userId = webSocketMap.keySet().stream().collect(Collectors.joining());
        System.out.println(userId);
    }

    public static void methodName2(){
        Map<String, Boolean> interestMap =new HashMap<>();
        interestMap.put("bb",true);
        if (interestMap.get("aa")){
            System.out.println("a");
        }
    }
}
